<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns="http://www.w3.org/1999/html">
<head>
    <th:block th:include="include :: header('立项申请新增')"/>
</head>
<body class="pear-container" onload="DisplayAndHiddenBtn()">



<form class="layui-form" action=""  th:object="${ApplyProject}" readonly="true">

	<h4 align="center" style="font-size: large">项目基本信息</h4><br>
<div class="layui-card">
	<div class="layui-card-body">

							<div class="layui-form-item layui-hide">
								<label class="layui-form-label">id</label>
								<div class="layui-input-block">
									<input readonly id="proId" type="text" th:value="*{id}" name="proId" lay-verify="title"
										   autocomplete="off" class="layui-input">
								</div>
							</div>

							<div class="layui-form-item">
								<label class="layui-form-label" id="proNumberLabel">项目编号</label>
								<div class="layui-input-inline" id="proNumber">
									<input readonly  th:value="*{proNumber}" type="text" name="proNumber" autocomplete="off" placeholder="项目编号" class="layui-input">
								</div>

								<label class="layui-form-label">学科分类</label>
								<div class="layui-input-inline">
									<select id="proSubject">
										<option value="" selected>请选择学科分类</option>
										<option disabled th:field="*{proSubject}" th:checked="*{proSubject} eq 'a'" value="a">马列社科</option>
										<option disabled th:field="*{proSubject}" th:checked="*{proSubject} eq 'b'" value="b">党史党建</option>
										<option disabled th:field="*{proSubject}" th:checked="*{proSubject} eq 'c'" value="c">哲学</option>
										<option disabled th:field="*{proSubject}" th:checked="*{proSubject} eq 'd'" value="d">理论经济</option>
										<option disabled th:field="*{proSubject}" th:checked="*{proSubject} eq 'e'" value="e">应用经济</option>
										<option disabled th:field="*{proSubject}" th:checked="*{proSubject} eq 'f'" value="f">统计学</option>
										<option disabled th:field="*{proSubject}" th:checked="*{proSubject} eq 'g'" value="g">政治学</option>
										<option disabled th:field="*{proSubject}" th:checked="*{proSubject} eq 'h'" value="h">法学</option>
										<option disabled th:field="*{proSubject}" th:checked="*{proSubject} eq 'i'" value="i">社会学</option>
										<option disabled th:field="*{proSubject}" th:checked="*{proSubject} eq 'j'" value="j">民族学</option>
										<option disabled th:field="*{proSubject}" th:checked="*{proSubject} eq 'k'" value="k">中国历史</option>
										<option disabled th:field="*{proSubject}" th:checked="*{proSubject} eq 'l'" value="l">世界历史</option>
										<option disabled th:field="*{proSubject}" th:checked="*{proSubject} eq 'm'" value="m">宗教学</option>
										<option disabled th:field="*{proSubject}" th:checked="*{proSubject} eq 'n'" value="n">中国文学</option>
										<option disabled th:field="*{proSubject}" th:checked="*{proSubject} eq 'o'" value="o">外国文学</option>
										<option disabled th:field="*{proSubject}" th:checked="*{proSubject} eq 'p'" value="p">语言学</option>
										<option disabled th:field="*{proSubject}" th:checked="*{proSubject} eq 'q'" value="q">新闻学与传播学</option>
										<option disabled th:field="*{proSubject}" th:checked="*{proSubject} eq 'r'" value="r">图书馆、情报与文献学</option>
										<option disabled th:field="*{proSubject}" th:checked="*{proSubject} eq 's'" value="s">体育学</option>
										<option disabled th:field="*{proSubject}" th:checked="*{proSubject} eq 't'" value="t">管理学</option>
										<option disabled th:field="*{proSubject}" th:checked="*{proSubject} eq 'u'" value="u">人口学</option>
										<option disabled th:field="*{proSubject}" th:checked="*{proSubject} eq 'v'" value="v">国际问题研究</option>
										<option disabled th:field="*{proSubject}" th:checked="*{proSubject} eq 'w'" value="w">考古学</option>
										<option disabled th:field="*{proSubject}" th:checked="*{proSubject} eq 'x'" value="x">教育学</option>
										<option disabled th:field="*{proSubject}" th:checked="*{proSubject} eq 'y'" value="y">艺术学</option>
									</select>
								</div>

								<label class="layui-form-label">项目类型</label>
								<div class="layui-input-inline">
									<select id="proType" >
										<option disabled="true" th:field="*{proType}" th:checked="*{proType} eq 'a'" value="a">新型智库项目</option>
										<option disabled="true" th:field="*{proType}" th:checked="*{proType} eq 'b'" value="b">省级社科联项目</option>
									</select>
								</div>

								<div class="layui-input-inline" name="selectChild" id="selectChild" lay-filter="selectChild">
									<select id="shengType" >
										<option disabled th:field="*{proTypeChild}" th:checked="*{proTypeChild} eq ''" value="" selected>请选择省级子项目类型</option>
										<option disabled th:field="*{proTypeChild}" th:checked="*{proTypeChild} eq 'c'" value="c">重大项目</option>
										<option disabled th:field="*{proTypeChild}" th:checked="*{proTypeChild} eq 'd'" value="d">一般项目</option>
										<option disabled th:field="*{proTypeChild}" th:checked="*{proTypeChild} eq 'e'" value="e">青年项目</option>
									</select>
								</div>

			                </div>

							<div class="layui-form-item">
								<label class="layui-form-label">项目名称</label>
								<div class="layui-input-inline">
									<input readonly  th:value="*{proName}" type="text" name="proName" autocomplete="off" placeholder="项目名称" class="layui-input">
								</div>

			                    <label class="layui-form-label">申报单位</label>
			                    <div class="layui-input-inline">
			                        <input readonly  th:value="*{proDept}" autocomplete="off" placeholder="申报单位" class="layui-input">
			                    </div>
			                </div>


</div>
</div>

<h4 align="center" style="font-size: large">课题负责人基本信息</h4><br>
<div class="layui-card">
	<div class="layui-card-body">





							<div class="layui-form-item">
			                    <label class="layui-form-label">姓名</label>
			                    <div class="layui-input-inline">
			                        <input readonly  th:value="*{manName}" type="text" name="manName" autocomplete="off" placeholder="负责人名称" class="layui-input">
			                    </div>

								<label class="layui-form-label">年龄</label>
								<div class="layui-input-inline">
									<input readonly  th:value="*{manAge}" type="text" name="manAge" autocomplete="off" placeholder="年龄" class="layui-input">

								</div>

								<label class="layui-form-label">性别</label>
								<div class="layui-input-inline">
									<input disabled="true" th:field="*{manSex}" th:checked="*{manSex} eq '0'" type="radio" name="manSex" value="0" title="男">
									<input disabled="true" th:field="*{manSex}" th:checked="*{manSex} eq '1'" type="radio" name="manSex" value="1" title="女">
								</div>

								<label class="layui-form-label">民族</label>
								<div class="layui-input-inline">
									<input readonly  th:value="*{manNation}" type="text" name="manNation" autocomplete="off" placeholder="民族" class="layui-input">
								</div>

			                </div>

							<div class="layui-form-item">
			                    <label class="layui-form-label">职务</label>
			                    <div class="layui-input-inline">
			                        <input readonly  th:value="*{manOffice}" type="text" name="manOffice" autocomplete="off" placeholder="职务" class="layui-input">
			                    </div>

								<label class="layui-form-label">专业职称</label>
								<div class="layui-input-inline">
									<input readonly  th:value="*{manTitle}" type="text" name="manTitle" autocomplete="off" placeholder="职称" class="layui-input">
								</div>

								<label class="layui-form-label">研究专长</label>
								<div class="layui-input-inline">
									<input readonly  th:value="*{manExpertise}" type="text" name="manExpertise" autocomplete="off" placeholder="专长" class="layui-input">
								</div>

								<label class="layui-form-label">电话</label>
								<div class="layui-input-inline">
									<input readonly  th:value="*{manPhone}" type="text" name="manPhone" autocomplete="off" placeholder="电话" class="layui-input">
								</div>

			                </div>

							<div class="layui-form-item">
			                    <label class="layui-form-label">通讯地址</label>
			                    <div class="layui-input-inline">
			                        <input readonly  th:value="*{manAddress}" style="width: 300px" type="text" name="manAddress" autocomplete="off" placeholder="地址" class="layui-input">
			                    </div>

								<label class="layui-form-label" style="margin-left: 80px">邮政编码</label>
								<div class="layui-input-inline" >
									<input readonly   th:value="*{manZip}" type="text" name="manZip" autocomplete="off" placeholder="邮政编码" class="layui-input">
								</div>

			                </div>
	</div>
</div>

<h4 align="center" style="font-size: large">与本课题有关的近期研究成果  <i id="ktTips" class="layui-icon layui-icon-tips" style="font-size: large"></i></h4>
<div class="layui-card">
	<div class="layui-card-body">
							<div class="layui-form-item">
			                    <label class="layui-form-label"></label>
<!--			                    <div class="layui-input-block">-->
<!--									<textarea th:utext="*{proResearch}" id="proResearch" name="proResearch" style="display: none;"></textarea>-->
<!--			                    </div>-->
								<div>
									<!--									<input type="text" name="proResearch" autocomplete="off" placeholder="近期研究成果" class="layui-input">-->
									<textarea readonly th:utext="*{proResearch}" id="proResearch"  name="proResearch" style="font-size: large;border-color: #4EC9B0" cols="110" rows="10"></textarea>
								</div>
			                </div>
	</div>
</div>

<h4 align="center" style="font-size: large">课题主要参与者基本情况</h4><br>
<div class="layui-card">
	<div class="layui-card-body">

							<div class="layui-form-item layui-hide">
			                    <label class="layui-form-label">主要参与者id</label>
			                    <div class="layui-input-block">
			                        <input readonly  type="text" name="partId" autocomplete="off" placeholder="主要参与者id" class="layui-input">
			                    </div>
			                </div>

							<table id="applyParticipator-table" lay-filter="applyParticipator-table"></table>

	</div>
</div>

<h4 align="center" style="font-size: large">课题论证设计  <i id="lzTips" class="layui-icon layui-icon-tips" style="font-size: large"></i></h4>
<div class="layui-card">
	<div class="layui-card-body">
							<div class="layui-form-item">
			                    <label class="layui-form-label"></label>
<!--			                    <div class="layui-input-block">-->
<!--									<textarea th:utext="*{proDesign}" id="proDesign" name="proDesign" style="display: none;"></textarea>-->
<!--			                    </div>-->
								<div >
									<!--									<input type="text" name="proDesign" autocomplete="off" placeholder="课题论证设计" class="layui-input">-->
									<textarea readonly th:utext="*{proDesign}" id="proDesign" name="proDesign" style="font-size:large;border-color: #4EC9B0" rows="30" cols="110"></textarea>
								</div>
							</div>
	</div>
</div>


<h4 align="center" style="font-size: large">完成本课题的条件分析  <i id="tjTips" class="layui-icon layui-icon-tips" style="font-size: large"></i></h4>
<div class="layui-card">
	<div class="layui-card-body">


							<div class="layui-form-item">
			                    <label class="layui-form-label"></label>
<!--			                    <div class="layui-input-block">-->
<!--									<textarea th:utext="*{proAnalyse}" id="proAnalyse" name="proAnalyse" style="display: none;"></textarea>-->
<!--			                    </div>-->
								<div>
									<textarea readonly th:utext="*{proAnalyse}" id="proAnalyse" style="font-size:large;border-color: #4EC9B0" name="proAnalyse" cols="110" rows="15"></textarea>
									<!--									<input type="text" name="proAnalyse" autocomplete="off" placeholder="完成条件分析" class="layui-input">-->
								</div>
			                </div>

	</div>
</div>

<h4 align="center" style="font-size: large">参加者分工情况</h4><br>
<div class="layui-card">
	<div class="layui-card-body">

							<div class="layui-form-item layui-hide">
			                    <label class="layui-form-label">分工情况id</label>
			                    <div class="layui-input-block">
			                        <input readonly  type="text" name="taskId" autocomplete="off" placeholder="分工情况id" class="layui-input">
			                    </div>
							</div>

							<table id="applyTask-table" lay-filter="applyTask-table"></table>


	</div>
</div>

<h4 align="center" style="font-size: large">经费预算</h4><br>
<div class="layui-card">
	<div class="layui-card-body">

							<div class="layui-form-item">
			                    <label class="layui-form-label">资料费(元)</label>
			                    <div class="layui-input-inline">
			                        <input readonly  th:value="*{costMart}" type="text" name="costMart" autocomplete="off" placeholder="资料费" class="layui-input">
			                    </div>

								<label class="layui-form-label">差旅费(元)</label>
								<div class="layui-input-inline">
									<input readonly  th:value="*{costTraval}" type="text" name="costTraval" autocomplete="off" placeholder="差旅费" class="layui-input">
								</div>

								<label class="layui-form-label">会议费(元)</label>
								<div class="layui-input-inline">
									<input readonly  th:value="*{costConf}" type="text" name="costConf" autocomplete="off" placeholder="会议费" class="layui-input">
								</div>

								<label class="layui-form-label">设备费(元)</label>
								<div class="layui-input-inline">
									<input readonly  th:value="*{costDevice}" type="text" name="costDevice" autocomplete="off" placeholder="设备费" class="layui-input">
								</div>

							</div>

											
							<div class="layui-form-item">
			                    <label class="layui-form-label">打印费(元)</label>
			                    <div class="layui-input-inline">
			                        <input readonly  th:value="*{costPrint}" type="text" name="costPrint" autocomplete="off" placeholder="打印费" class="layui-input">
			                    </div>

								<label class="layui-form-label">咨询费(元)</label>
								<div class="layui-input-inline">
									<input readonly  th:value="*{costConsult}" type="text" name="costConsult" autocomplete="off" placeholder="咨询费" class="layui-input">
								</div>

								<label class="layui-form-label">其他经费(元)</label>
								<div class="layui-input-inline">
									<input readonly  th:value="*{costOther}" type="text" name="costOther" autocomplete="off" placeholder="其他经费" class="layui-input">
								</div>

								<label class="layui-form-label">总费用(元)</label>
								<div class="layui-input-inline">
									<input readonly  th:value="*{costTotal}" type="text" name="costTotal" autocomplete="off" placeholder="预计总费用" class="layui-input">
								</div>

			                </div>

											
							<div class="layui-form-item">
			                    <label class="layui-form-label">单位账号</label>
			                    <div class="layui-input-inline">
			                        <input readonly  th:value="*{costAccount}" style="width: 300px" type="text" name="costAccount" autocomplete="off" placeholder="经费单位账号" class="layui-input">
			                    </div>

								<label class="layui-form-label" style="margin-left: 80px">单位地址</label>
								<div class="layui-input-inline">
									<input readonly  th:value="*{costAddress}" style="width: 300px" type="text" name="costAddress" autocomplete="off" placeholder="经费单位地址" class="layui-input">
								</div>

								<label class="layui-form-label" style="margin-left: 80px">单位邮编</label>
								<div class="layui-input-inline">
									<input readonly  th:value="*{costZip}" type="text" name="costZip" autocomplete="off" placeholder="经费单位邮政编码" class="layui-input">
								</div>
			                </div>

							<div class="layui-form-item">
								<label class="layui-form-label">备注</label>
								<div class="layui-input-block">
									<input readonly  th:value="*{costRemark}" type="text" name="costRemark" autocomplete="off" placeholder="备注" class="layui-input">
								</div>
							</div>

							<div class="layui-input-block layui-hide">
								<input readonly id="deptPass2" th:value="*{deptPass}" type="text" name="deptPass2" autocomplete="off" placeholder="备注" class="layui-input">
							</div>
	</div>
</div>

	<h4 align="center" style="font-size: large">课题负责人所在单位审核意见</h4><br>
	<h4 align="center" style="font-size: medium">(1、申请书所填写的内容是否属实；2、申请者的政治素质与业务水平是否适于承担本课题的研究)</h4>
	<h4 align="center" style="font-size: medium">(3、主管单位能否提供完成本课题所需时间和其他必要条件；4、本单位是否同意承担本课题的经费管理和信誉保证)</h4><br>
	<div class="layui-card">
		<div class="layui-card-body">
			<div class="layui-form-item">
				<div class="layui-input-block" id="deptRemark_edit">
<!--					<input type="text" name="deptRemark" autocomplete="off"  class="layui-input">-->
					<textarea id="deptRemark" name="deptRemark" style="display: none;"></textarea>
				</div>
				<div class="layui-input-block" id="deptRemark_read">
					<textarea  th:utext="*{deptRemark}" id="deptRemarkRead" name="deptRemarkRead" style="display: none;"></textarea>
				</div>
			</div><br><br><br>
</div>
</div>

	<div class="bottom" style="position: fixed;bottom: 0">
		<div class="button-container">
			<button id="pass" type="submit" class="layui-btn layui-btn-normal layui-btn-sm" lay-submit="" lay-filter="applyProject-pass">
				<i class="layui-icon layui-icon-ok"></i>
				审核通过
			</button>
			<button id="noPass" type="submit" class="layui-btn layui-btn-normal layui-btn-sm" lay-submit="" lay-filter="applyProject-noPass">
				<i class="layui-icon layui-icon-ok"></i>
				审核不通过
			</button>
<!--			<button type="reset" class="layui-btn layui-btn-primary layui-btn-sm">-->
<!--				<i class="layui-icon layui-icon-refresh"></i>-->
<!--				重置-->
<!--			</button>-->
		</div>
	</div>

</form>
<script>
	//根据单位审核状态显示和隐藏按钮
	function DisplayAndHiddenBtn() {
		if ($("#deptPass2").val() == 1 || $("#deptPass2").val() == 2) {
			//隐藏审核通过按钮
			$("#pass").hide();
			//隐藏审核不通过按钮
			$("#noPass").hide();
			//隐藏单位意见编辑
			$("#deptRemark_edit").hide();
			//显示单位意见可见，不可编辑
			$("#deptRemark_read").show();
		}else if($("#deptPass2").val() == 0){
			$("#deptRemark_edit").show();
			$("#deptRemark_read").hide();
		};
		if($("#proType option:selected").val() == "b" ){
			$("#selectChild").show();
			form.render('select');
		}else{
			$("#selectChild").hide();
			form.render('select');//select是固定写法 不是选择器
		}
		form.render();
	}

</script>
<th:block th:include="include :: footer"/>
<script>
    layui.use(['form','laydate','jquery','table','layedit'], function () {
		let table = layui.table;
        let form = layui.form;
        let $ = layui.jquery;
        let MODULE_PATH = rootPath+"/AuditApplyController";
        var proId = $("#proId").val();
		var layedit=layui.layedit;

		//完成本课题条件论证提示
		$("#tjTips").mouseover(function() {
			layer.tips('包括参加人员的研究能力、资料设备、科研手段和时间保证等', this, {
				tips: [3, "#170c0c"],time:6000,
			});
		});



		//课题论证提示
		$("#lzTips").mouseover(function() {
			layer.tips('1.本课题国内外或省内外研究概况，本课题研究的理论意义。</br>' +
					'2.本课题研究的主要观点、主要内容、篇章结构、重点和难点分析。</br>' +
					'3.本课题的研究方法，预期研究成果。逐项填写，篇幅不够可加另项', this, {
				tips: [3, "#170c0c"],time:6000,
			});
		});

		//课题有关近期研究成果提示
		$("#ktTips").mouseover(function() {
			layer.tips('近期研究成果应注明成果名称、成果形式、发表刊物或出版单位，发表或出版时间', this, {
				tips: [3, "#170c0c"],time:6000,
			});
		});

		//项目类型显示或隐藏
		form.on('select(firstProType)', function(data){
			// console.log($("#proType option:selected").val());
			if($("#proType option:selected").val() == "b" ){
				$("#selectChild").show();
				form.render('select');
			}else{
				$("#selectChild").hide();
				form.render('select');//select是固定写法 不是选择器
			}
			form.render();
		});

		//配置近期研究成果的富文本编辑器
		// var layeditProResearch=layedit.build('proResearch',
		// 		{
		// 			tool: [
		// 				// 'strong' //加粗
		// 				// ,'italic' //斜体
		// 				// ,'underline' //下划线
		// 				// ,'del' //删除线
		// 				//
		// 				// ,'|' //分割线
		//
		// 				,'left' //左对齐
		// 				,'center' //居中对齐
		// 				,'right' //右对齐
		// 			]
		// 		}); //建立编辑器
		// //配置课题论证设计的富文本编辑器
		// var layeditProDesign=layedit.build('proDesign',
		// 		{
		// 			tool: [
		// 				// 'strong' //加粗
		// 				// ,'italic' //斜体
		// 				// ,'underline' //下划线
		// 				// ,'del' //删除线
		// 				//
		// 				// ,'|' //分割线
		//
		// 				,'left' //左对齐
		// 				,'center' //居中对齐
		// 				,'right' //右对齐
		// 			]
		// 		}); //建立编辑器
		// //配置条件分析的富文本编辑器
		// var layeditProAnalyse=layedit.build('proAnalyse',
		// 		{
		// 			tool: [
		// 				// 'strong' //加粗
		// 				// ,'italic' //斜体
		// 				// ,'underline' //下划线
		// 				// ,'del' //删除线
		// 				//
		// 				// ,'|' //分割线
		//
		// 				,'left' //左对齐
		// 				,'center' //居中对齐
		// 				,'right' //右对齐
		// 			]
		// 		}); //建立编辑器

		//配置单位意见可编辑的富文本编辑器
		var layeditDeptRemark=layedit.build('deptRemark',
				{
					tool: [
						// 'strong' //加粗
						// ,'italic' //斜体
						// ,'underline' //下划线
						// ,'del' //删除线
						//
						// ,'|' //分割线

						,'left' //左对齐
						,'center' //居中对齐
						,'right' //右对齐
					]
				}); //建立编辑器

		//配置只读单位审核意见的富文本编辑器
		var layeditDeptRemarkRead=layedit.build('deptRemarkRead',
				{
					tool: [
						// 'strong' //加粗
						// ,'italic' //斜体
						// ,'underline' //下划线
						// ,'del' //删除线
						//
						// ,'|' //分割线

						,'left' //左对齐
						,'center' //居中对齐
						,'right' //右对齐
					]
				}); //建立编辑器


		//table字段
		let cols = [
			[
				{type: 'checkbox'},
				{title: '序号', type: 'numbers'},
				{title: '姓名', field: 'partName', align: 'center'},

				{title: '年龄', field: 'partAge', align: 'center'},

				{title: '专业职称', field: 'partTitle', align: 'center'},

				{title: '工作单位', field: 'partDept', align: 'center'},

				{title: '研究专长', field: 'partExpertise', align: 'center'},
				{title: '负责人', field: 'manName', align: 'center'},

				{title: '近期研究成果', field: 'researchRes', align: 'center'},
			]
		]

		//参与者基本信息table表单列表
		table.render({
			elem: '#applyParticipator-table',
			url: rootPath+"/ApplyParticipatorController/" + 'list/'+$("input[name='proId']").val(),      //此处跳转到ApplyParticipatorController
			page: true,
			method: 'get',
			cols: cols,
			skin: 'line',
		});

		//分工情况table字段
		let cols2 = [
			[
				{type: 'checkbox'},

				{title: '序号', type: 'numbers'},

				{title: '承担人', field: 'partName', align: 'center'},

				{title: '研究开始时间', field: 'dateStart', align: 'center',
					templet : "<div>{{layui.util.toDateString(d.updateTime, 'yyyy-MM-dd')}}</div>"},

				{title: '最终完成时间', field: 'dateEnd', align: 'center',
					templet : "<div>{{layui.util.toDateString(d.updateTime, 'yyyy-MM-dd')}}</div>"},

				{title: '阶段成果名称', field: 'resName', align: 'center'},

				{title: '最终成果形式', field: 'resType', align: 'center'},
			]
		]

		//分工情况table表单列表
		table.render({
			elem: '#applyTask-table',
			url: rootPath+"/ApplyTaskController/" + 'list/'+$("input[name='proId']").val(),
			page: true,
			method: 'get',
			cols: cols2,
			skin: 'line',
		});

		//审核通过
		form.on('submit(applyProject-pass)', function (data) {

			data.field.id = $("#proId").val();
			//富文本
			// data.field.deptRemark = layedit.getContent(layeditDeptRemark);
			// data.field.proResearch = layedit.getContent(layeditProResearch);
			// data.field.proDesign = layedit.getContent(layeditProDesign);
			// data.field.proAnalyse = layedit.getContent(layeditProAnalyse);
			//单位审核通过
			data.field.deptPass = 1;
			//社科联审核状态为待审核
			data.field.sklPass = 0;
			layer.confirm('确定要提交信息，提交后将无法更改', {icon: 3, title: '提示'}, function (index) {
				let loader = layer.load();
				$.ajax({
					url: MODULE_PATH + '/edit',
					data: data.field,
					dataType: 'json',
					contentType: 'application/x-www-form-urlencoded',
					type: 'post',
					success: function (result) {
						if (result.code == 200) {
							layer.msg(result.msg, {icon: 1, time: 1000}, function () {
								parent.layer.close(parent.layer.getFrameIndex(window.name));//关闭当前页
								parent.layui.table.reload("applyProject-table");
								layer.close(loader);
							});
						} else {
							layer.msg(result.msg, {icon: 2, time: 1000});
							layer.close(loader);
						}
					}
				})
			});
			return false;
		});

        //审核不通过
		form.on('submit(applyProject-noPass)', function (data) {
			data.field.id = $("#proId").val();
			//富文本
			// data.field.deptRemark = layedit.getContent(layeditDeptRemark);
			// data.field.proResearch = layedit.getContent(layeditProResearch);
			// data.field.proDesign = layedit.getContent(layeditProDesign);
			// data.field.proAnalyse = layedit.getContent(layeditProAnalyse);
			//单位审核不通过
			data.field.deptPass = 2;
			//项目状态为审核不通过
			data.field.proState = 2;
			layer.confirm('确定要提交信息，提交后将无法更改', {icon: 3, title: '提示'}, function (index) {
				let loader = layer.load();
				$.ajax({
					url: MODULE_PATH + '/edit',
					data: data.field,
					dataType: 'json',
					contentType: 'application/x-www-form-urlencoded',
					type: 'post',
					success: function (result) {
						if (result.code == 200) {
							layer.msg(result.msg, {icon: 1, time: 1000}, function () {
								parent.layer.close(parent.layer.getFrameIndex(window.name));//关闭当前页
								parent.layui.table.reload("applyProject-table");
								layer.close(loader);
							});
						} else {
							layer.msg(result.msg, {icon: 2, time: 1000});
							layer.close(loader);
						}
					}
				})
			});
			return false;
		});
    })
</script>
</body>
</html>